package cn.edu.sgu.www.pms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
public class User implements Serializable {
    private static final long serialVersionUID = 18L;

    @TableId(type = IdType.INPUT)
    @ApiModelProperty(name = "用户ID")
    private String id;

    /**
     * 用户姓名
     */
    @ApiModelProperty(name = "用户姓名")
    private String name;

    /**
     * 性别
     */
    @ApiModelProperty(name = "性别")
    private Integer gender;

    /**
     * 用户名
     */
    @ApiModelProperty(name = "用户名")
    private String username;

    /**
     * 密码
     */
    @ApiModelProperty(name = "密码")
    private String password;

    /**
     * 手机号
     */
    @ApiModelProperty(name = "手机号")
    private String phone;

    /**
     * 应用ID
     */
    @ApiModelProperty(value = "应用ID")
    private Integer serviceId;

    /**
     * 锁定状态，锁定的账号将无法登录系统。
     * 0-未锁定；1-已锁定
     */
    @ApiModelProperty(name = "锁定状态")
    private Integer lockStatus;

    /**
     * 最后一次登录时间
     */
    @ApiModelProperty(name = "最后一次登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime lastLoginTime;
}